<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        ul{
            list-style: none;
            width: 83px;
            border: 1px solid red;
            box-sizing: border-box;
            padding: 0;
            margin: 0;
            margin-top: 1px;
            display: none;
        }
        li{
            width: 83px;
            line-height: 30px;
            height: 30px;
            text-align: center;
        }
        #Gb{
            border-top:1px solid red ;
        }
        li:hover{
            background-color: sandybrown;
        }
    </style>
</head>
<body>
    <button onclick="show()" id="btn">输入法选择</button>
    <ul id="ul">
        <li>中文</li>
        <li>英文</li>
        <li onclick="hide()" id="Gb">关闭</li>
    </ul>
    <script>
        var btn = document.getElementById('btn')
        var ul = document.getElementById('ul')
        function show(){
            ul.style.display = 'block'
        }
        function hide(){
            ul.style.display = 'none'
        }
    </script>
    
</body>
</html>